<?php
/**
 * 获取道具定义列表
 */
class GetProps extends APIBase {

    public $tag = "GetProps";
    public $isLogin = false;

    public function before() {
        $this->initCacheRedis();
        return true;
    }

    public function logic() {
        $keys = $this->cache_redis->lRange("prop:ids", 0, -1);
        $props = array();
        foreach ($keys as $key) {
            $pps = $this->cache_redis->hMGet("prop:{$key}", array("id", "name","desc", "createtime"));
            $props[]=$pps;
        }
		
        $this->returnData($props);
    }

    public function after() {
        $this->deinitCacheRedis();
    }
}
?>
